Skip to content

docs: fix the invalid YAML in the regex activation and sync exec examples - #3364

Open
rida-ghreizy wants to merge 1 commit into
devspace-sh:mainfrom
rida-ghreizy:docs/fix-invalid-yaml-examples
Open

rida-ghreizy wants to merge 1 commit into
devspace-sh:mainfrom
rida-ghreizy:docs/fix-invalid-yaml-examples

Conversation

@rida-ghreizy

Copy link
Copy Markdown

What this PR does

Two devspace.yaml examples in the current docs don't load: the YAML parser rejects them.

  1. configuration/profiles/activation.mdx, "Example: Regular Expression Activation".

    - env:
        ENV: "prod-\d+"

    In a double-quoted YAML scalar, \ starts an escape sequence, and \d is not a valid one ("found unknown escape character"), so the whole config fails to parse. With single quotes, 'prod-\d+', the backslash reaches DevSpace as written, and the value is the regex prod-\d+ that the text below the example describes.

  2. configuration/dev/connections/file-sync.mdx, the full onUpload.exec reference. The local, onChange and name keys of the last exec entry were indented with a tab, which YAML forbids. They are now indented with spaces, aligned with failOnError above them.

How it was tested

I parsed every YAML code block in docs/pages/ with a YAML parser. These two were the only ones that failed, apart from blocks with Docusaurus // highlight-* markers, and both parse after the change. Only docs/pages/ changes; versioned_docs/version-5.x has the same activation example if you want it updated as well.

…ples

The regular expression activation example wrote ENV: "prod-\d+". In a
double-quoted YAML string \d is an invalid escape, so the config does
not load; single quotes keep the backslash for the regex. The
sync.onUpload.exec example indented three keys with tabs.

Signed-off-by: rida <ghreizyrida1@gmail.com>
@netlify

netlify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devspace-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 93779d6
🔍 Latest deploy log https://app.netlify.com/projects/devspace-docs/deploys/6b086e2058067824bf24ae67
😎 Deploy Preview https://deploy-preview-3364--devspace-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant